package com.m3839.sdk.ym.widget.toast

import android.view.View

/**
 * desc   : [View.OnClickListener] 包装类
 */
internal class ViewClickWrapper<T: View>(
    private val floatView: YMFloatView,
    view: View,
    private val mListener: OnClickListener<T>
) : View.OnClickListener {

    override fun onClick(v: View) {
        mListener.onClick(floatView, v as T)
    }

    init {
        view.setOnClickListener(this)
    }
}